import request from "@/utils/request";

// 查询商品品牌列表
export function listBrand(query) {
  return request({
    url: "/goods/brand/list",
    method: "post",
    data: query,
  });
}

// 查询商品品牌详细
export function getBrand(id) {
  return request({
    url: "/goods/brand/" + id,
    method: "get",
  });
}

// 新增商品品牌
export function addBrand(data) {
  return request({
    url: "/goods/brand/add",
    method: "post",
    data: data,
  });
}

// 修改商品品牌
export function updateBrand(data) {
  return request({
    url: "/goods/brand/update",
    method: "post",
    data: data,
  });
}

// 删除商品品牌
export function delBrand(id) {
  return request({
    url: "/goods/brand/delete/" + id,
    method: "post",
  });
}
// 停用
export function close(id) {
  return request({
    url: "/goods/brand/close/" + id,
    method: "post",
  });
}

export function handleImportDataUpdate(data) {
  return request({
    url: "/goods/brand/importDataUpdate",
    method: "post",
    data,
  });
}
